﻿
@model CinemaManagement.Models.RegisterModel

@{
    ViewBag.Title = "Register";
    Layout = "~/Views/Shared/_LayoutHome.cshtml";
}


<div class="row justify-content-center align-items-center">
    <div class="col-md-4">
        <section id="loginForm">
            @using (Html.BeginForm("Register", "Home", new { },
                FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
            {
                @Html.AntiForgeryToken()
                <h4 class="row justify-content-center align-content-center">用户注册</h4>
                <hr />
                @Html.ValidationSummary(true)
                <div class="form-group">
                    @Html.LabelFor(m => m.Name, "用户名", new { @class = "control-label " })
                    <div class="col-md-8 ">
                        @Html.TextBoxFor(m => m.Name, new { @class = "col-md-8 form-control" })
                    </div>
                    @Html.ValidationMessageFor(m => m.Name)
                </div>
                <div class="form-group">
                    @Html.LabelFor(m => m.Email, "邮箱", new { @class = "control-label " })
                    <div class="col-md-8 ">
                        @Html.TextBoxFor(m => m.Email, new { @class = "col-md-8 form-control" })
                    </div>
                    @Html.ValidationMessageFor(m => m.Email)
                </div>
                <br />
                <div class="form-group">
                    @Html.LabelFor(m => m.Password, "密码", new { @class = "control-label" })
                    <div class="col-md-8">
                        @Html.PasswordFor(m => m.Password, new { @class = "col-md-8 form-control" })
                    </div>
                    @Html.ValidationMessageFor(m => m.Password)
                </div>
                <div class="form-group">
                    @Html.LabelFor(m => m.ConfirmPassword, "确认密码", new { @class = "control-label" })
                    <div class="col-md-8">
                        @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "col-md-8 form-control" })
                    </div>
                    @Html.ValidationMessageFor(m => m.ConfirmPassword)
                </div>
                <br />
                <div class="form-group text-center">
                    <input type="submit" value="注册" class="col-md-6 btn btn-outline-primary" />
                    @Html.ValidationMessage("failed")
                </div>
            }
            <a href="@Url.Action("UserLogin", "Home",new {@class="pull-right"})">返回登录</a>
        </section>
    </div>
</div>